import { RouteRecordRaw } from 'vue-router'

// 矩阵业务系统路由配置
const matrixRoutes: RouteRecordRaw[] = [
  {
    path: '/matrix',
    component: () => import('@/layout/index.vue'),
    redirect: '/matrix/index',
    name: 'Matrix',
    meta: {
      title: '矩阵业务系统',
      icon: 'system',
      alwaysShow: true
    },
    children: [
      // 首页
      {
        path: 'index',
        name: 'MatrixIndex',
        component: () => import('@/views/matrix/index.vue'),
        meta: {
          title: '首页',
          icon: 'dashboard'
        }
      },
      // 四全模块
      {
        path: 'siquan',
        name: 'siquan',
        component: () => import('@/views/matrix/siquan/index.vue'),
        redirect: '/matrix/siquan/register',
        meta: {
          title: '四全',
          icon: 'system',
          alwaysShow: true
        },
        children: [
          {
            path: 'register',
            name: 'ReservoirRegister',
            component: () => import('@/views/matrix/siquan/register/index.vue'),
            meta: {
              title: '水库注册登记',
              icon: 'form'
            }
          },
          {
            path: 'dispatch',
            name: 'DispatchOperation',
            component: () => import('@/views/matrix/siquan/dispatch/index.vue'),
            meta: {
              title: '调度运用',
              icon: 'process-definition'
            }
          },
          {
            path: 'maintenance',
            name: 'Maintenance',
            component: () => import('@/views/matrix/siquan/maintenance/index.vue'),
            meta: {
              title: '维修养护',
              icon: 'build'
            }
          },
          {
            path: 'inspection',
            name: 'Inspection',
            component: () => import('@/views/matrix/siquan/inspection/index.vue'),
            meta: {
              title: '巡视检查',
              icon: 'search'
            }
          },
          {
            path: 'safetyAssessment',
            name: 'SafetyAssessment',
            component: () => import('@/views/matrix/siquan/safetyAssessment/index.vue'),
            meta: {
              title: '安全鉴定',
              icon: 'education'
            }
          },
          {
            path: 'reinforcement',
            name: 'Reinforcement',
            component: () => import('@/views/matrix/siquan/reinforcement/index.vue'),
            meta: {
              title: '除险加固',
              icon: 'finish'
            }
          },
          {
            path: 'emergencyManagement',
            name: 'EmergencyManagement',
            component: () => import('@/views/matrix/siquan/emergencyManagement/index.vue'),
            meta: {
              title: '应激管理',
              icon: 'message'
            }
          },
          {
            path: 'decommission',
            name: 'Decommission',
            component: () => import('@/views/matrix/siquan/decommission/index.vue'),
            meta: {
              title: '降等报废',
              icon: 'lock'
            }
          }
        ]
      },
      // 四制模块
      {
        path: 'sizhi',
        name: 'sizhi',
        component: () => import('@/views/matrix/sizhi/index.vue'),
        redirect: '/matrix/sizhi/managementSystem',
        meta: {
          title: '四制',
          icon: 'dict',
          alwaysShow: true
        },
        children: [
          {
            path: 'managementSystem',
            name: 'ManagementSystem',
            component: () => import('@/views/matrix/sizhi/managementSystem/index.vue'),
            meta: {
              title: '管理制度',
              icon: 'documentation'
            }
          },
          {
            path: 'responsibilityManagement',
            name: 'ResponsibilityManagement',
            component: () => import('@/views/matrix/sizhi/responsibilityManagement/index.vue'),
            meta: {
              title: '责任管理',
              icon: 'peoples'
            }
          },
          {
            path: 'regulations',
            name: 'Regulations',
            component: () => import('@/views/matrix/sizhi/regulations/index.vue'),
            meta: {
              title: '法规制度',
              icon: 'documentation'
            }
          },
          {
            path: 'fund-management',
            name: 'FundManagement',
            component: () => import('@/views/matrix/sizhi/fundManagement/index.vue'),
            meta: {
              title: '资金管理',
              icon: 'money'
            }
          },
          {
             path: 'propertyRegistration',
             name: 'PropertyRegistration',
             component: () => import('@/views/matrix/sizhi/propertyRegistration/index.vue'),
             meta: {
               title: '财产登记',
               icon: 'company'
             }
           },
          {
            path: 'relatedInfo',
            name: 'RelatedInfo',
            component: () => import('@/views/matrix/sizhi/relatedInfo/index.vue'),
            meta: {
              title: '相关信息',
              icon: 'link'
            }
          },
          {
            path: 'emergencyLinkage',
            name: 'EmergencyLinkage',
            component: () => import('@/views/matrix/sizhi/emergencyLinkage/index.vue'),
            meta: {
              title: '应急联动',
              icon: 'online'
            }
          }
        ]
      },
      // 四预模块
      {
        path: 'siyu',
        name: 'Siyu',
        component: () => import('@/views/matrix/siyu/index.vue'),
        redirect: '/matrix/siyu/weatherInfo',
        meta: {
          title: '四预',
          icon: 'international',
          alwaysShow: true
        },
        children: [
          {
            path: 'weatherInfo',
            name: 'WeatherInfo',
            component: () => import('@/views/matrix/siyu/weatherInfo/index.vue'),
            meta: {
              title: '气象信息',
              icon: 'international'
            }
          },
          {
            path: 'typicalRainfall',
            name: 'TypicalRainfall',
            component: () => import('@/views/matrix/siyu/typicalRainfall/index.vue'),
            meta: {
              title: '典型降雨',
              icon: 'chart'
            }
          },
          {
            path: 'dispatchManagement',
            name: 'DispatchManagement',
            component: () => import('@/views/matrix/siyu/dispatchManagement/index.vue'),
            meta: {
              title: '调度管理',
              icon: 'server'
            }
          },
          {
            path: 'planManagement',
            name: 'PlanManagement',
            component: () => import('@/views/matrix/siyu/planManagement/index.vue'),
            meta: {
              title: '预案管理',
              icon: 'documentation'
            }
          },
          {
            path: 'smsQuery',
            name: 'SmsQuery',
            component: () => import('@/views/matrix/siyu/smsQuery/index.vue'),
            meta: {
              title: '短信查询',
              icon: 'message'
            }
          },
          {
            path: 'warningConfig',
            name: 'WarningConfig',
            component: () => import('@/views/matrix/siyu/warningConfig/index.vue'),
            meta: {
              title: '预警配置',
              icon: 'bug'
            }
          }
        ]
      },
      // 四管模块
      {
        path: 'siguan',
        name: 'siguan',
        component: () => import('@/views/matrix/siguan/index.vue'),
        redirect: '/matrix/siguan/demoInspection',
        meta: {
          title: '四管',
          icon: 'tool',
          alwaysShow: true
        },
        children: [
          {
            path: 'demoInspection',
            name: 'DemoInspection',
            component: () => import('@/views/matrix/siguan/demoInspection/index.vue'),
            meta: {
              title: '巡查管理',
              icon: 'search'
            }
          },
          {
            path: 'problemTicket',
            name: 'ProblemTicket',
            component: () => import('@/views/matrix/siguan/problemTicket/index.vue'),
            meta: {
              title: '问题工单',
              icon: 'bug'
            }
          },
          {
            path: 'equipmentMaintenance',
            name: 'EquipmentMaintenance',
            component: () => import('@/views/matrix/siguan/equipmentMaintenance/index.vue'),
            meta: {
              title: '设备维护养护',
              icon: 'tool'
            }
          },
          {
            path: 'reservoirBoundary',
            name: 'ReservoirBoundary',
            component: () => import('@/views/matrix/siguan/reservoirBoundary/index.vue'),
            meta: {
              title: '水库划界',
              icon: 'tree'
            }
          },
          {
            path: 'registration',
            name: 'Registration',
            component: () => import('@/views/matrix/siguan/registration/index.vue'),
            meta: {
              title: '注册登记',
              icon: 'form'
            }
          },
          {
            path: 'dispatchOperation',
            name: 'DispatchOperationSiGuan',
            component: () => import('@/views/matrix/siguan/dispatchOperation/index.vue'),
            meta: {
              title: '调度运用',
              icon: 'process-definition'
            }
          },
          {
            path: 'emergencyPlan',
            name: 'EmergencyPlan',
            component: () => import('@/views/matrix/siguan/emergencyPlan/index.vue'),
            meta: {
              title: '应急预案',
              icon: 'documentation'
            }
          },
          {
            path: 'emergencyDrill',
            name: 'EmergencyDrill',
            component: () => import('@/views/matrix/siguan/emergencyDrill/index.vue'),
            meta: {
              title: '应急演练',
              icon: 'chart'
            }
          }
        ]
      }
    ]
  }
]

export default matrixRoutes